package com.nondo.dean.platform.model.param;

import java.math.BigDecimal;

import javax.validation.constraints.NotNull;

import com.nondo.dean.common.tool.BeanUtils;
import com.nondo.dean.platform.domain.Zone;

public class ZoneParam {
    private Integer id; // 区域ID
    private String name; // 区域名称
    private BigDecimal discount; // 折扣率
    private String provinceIds; // 下辖省份

    public Integer getId() {
        return id;
    }

    public void setId(Integer zoneId) {
        this.id = zoneId;
    }

    public String getName() {
        return name;
    }

    public void setName(String zoneName) {
        this.name = zoneName;
    }

    public BigDecimal getDiscount() {
        return discount;
    }

    public void setDiscount(BigDecimal discount) {
        this.discount = discount;
    }

    @NotNull(message = "下辖省份ID必传")
    public String getProvinceIds() {
        return provinceIds;
    }

    public void setProvinceIds(String provinceIds) {
        this.provinceIds = provinceIds;
    }

    public static Zone covertToDto(ZoneParam param) {
        Zone zone = new Zone();
        BeanUtils.copy(param, zone);
        return zone;
    }

}
